import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { Form } from 'antd-v4';
import { BaseForm } from '../../BaseForm';
import { Group, ProFormItem } from '../../components';

function ProForm(props) {
  return _jsx(BaseForm, _objectSpread({
    layout: "vertical",
    submitter: {
      // 反转按钮，在正常模式下，按钮应该是主按钮在前
      render: function render(_, dom) {
        return dom.reverse();
      }
    },
    contentRender: function contentRender(items, submitter) {
      return _jsxs(_Fragment, {
        children: [items, submitter]
      });
    }
  }, props));
}

ProForm.Group = Group;
ProForm.useForm = Form.useForm;
ProForm.Item = ProFormItem;
ProForm.useWatch = Form.useWatch;
ProForm.ErrorList = Form.ErrorList;
ProForm.Provider = Form.Provider;
export { ProForm };